import request from '@/utils/request'

// 查询计量台账列表
export function listLedger(query) {
  return request({
    url: '/meter/bb/list',
    method: 'get',
    params: query
  })
}
// 获取计量台账分类统计数据
export function listLedgerCount(query) {
  return request({
    url: '/meter/bb/listCount',
    method: 'get',
    params: query
  })
}


// 查询计量台账详细
export function getLedger(projectId) {
  return request({
    url: '/meter/bb/' + projectId,
    method: 'get'
  })
}

// 新增计量台账
export function addLedger(data) {
  return request({
    url: '/meter/bb',
    method: 'post',
    data: data
  })
}

// 修改计量台账
export function updateLedger(data) {
  return request({
    url: '/meter/bb',
    method: 'put',
    data: data
  })
}

// 删除计量台账
export function delLedger(projectId) {
  return request({
    url: '/meter/bb/' + projectId,
    method: 'delete'
  })
}
